<template>
  <div class="dashboard-container">
    <div v-if="deptId < 200" class="dashboard-text">
      超级成交大师
      <span style="color: #409eff">{{ name }}</span>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
  name: 'Dashboard',
  data() {
    return {
      value1: '',
    };
  },
  computed: {
    ...mapGetters(['name', 'deptId']),
    isMobile() {
      return this.$isMobile();
    },
  },
  created() {
    switch (this.deptId) {
      case 201:
        this.$router.push('/mobile/shopkeeper');
        return;
      case 202:
        this.$router.push('/mobile/director');
        return;
      case 203:
        if (this.isMobile) {
          this.$router.push('/mobile/keeper');
        }
        return;
      case 213:
        this.$router.push('/mobile/keeper');
        return;
      case 204:
        this.$router.push('/mobile/reception');
        return;
      case 205:
      case 206:
      case 207:
      case 208:
        this.$router.push('/mobile/operator');
        return;
    }
  },
  // mounted() {
  //   this.getBaseInfo('0').then((res) => {
  //     console.log(res)
  //   })
  // },
  methods: {
    // ...mapActions([
    //   'getBaseInfo'
    // ]),
  },
};
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
